<div class="row" style="margin-bottom: 10px;">
    <div class="col-md-8" style="text-align: left;">
        <a class="btn btn-primary" href="javascript:;"  onclick="return_main()"  >返回主菜单</a>
        &nbsp;&nbsp;
        <a class="btn btn-primary" href="javascript:;"  onclick="return_up()"  >返回上一页</a>
        &nbsp;&nbsp;
        <a class="btn btn-primary" href="javascript:;" onclick="_es_openDilogMiddle2('{:U('Auth/auth_rule_add',array('is_add'=>0,'parent_id'=>$parent_id))}','新增菜单','xinzengcaidan')">新增菜单</a>
    </div>
    <div class="col-md-4" style="line-height: 35px;text-align: right;">&nbsp;&nbsp;
        菜单名称：<input type="text" name="title" value="{$title}" >&nbsp;&nbsp;<a href="javascript:;" onclick="load()" class="btn btn-default btn-sm">搜索</a>
    </div>

</div>
<table class="table table-bordered" id="tbmain">
    <thead>
    <tr>
        <th>菜单名称</th>
        <th>菜单地址</th>
        <th>状态</th>
        <th>最新</th>
        <th>显示</th>
        <th>排序</th>
        <th width="28%">操作</th>
    </tr>
    </thead>
    <tbody>
    <notempty name="treeList['lists']">
    <volist name="treeList['lists']" id="m">
        <tr>
            <td style="text-align: center;"><a href="javascript:;" onclick="toParentChilder({$m['id']})" >{$m['title']}</a></td>
            <td>{$m['name']}</td>
            <td>
                <if condition="$m['status'] eq 1">
                    启用
                    <else/>
                    禁止
                </if>
            </td>
            <td>
                <if condition="$m['is_new'] eq 1">
                    启用
                    <else/>
                    禁止
                </if>
            </td>
            <td>
                <if condition="$m['is_display'] eq 1">
                    启用
                    <else/>
                    禁止
                </if>
            </td>
            <td>{$m['sort']}</td>
            <td>
                <a href="javascript:;" onclick="_es_openDilogMiddle2('{:U('Auth/auth_rule_add',array('is_add'=>0,parent_id=>$m['id']))}','新增子菜单','xinzengzidancai')" class="btn btn-info btn-sm">新增子菜单</a>&nbsp;
                <a href="javascript:;" onclick="toParentChilder({$m['id']})"  class="btn btn-info btn-sm">查看子菜单</a>&nbsp;
                <a href="javascript:;" onclick="_es_openDilogMiddle2('{:U('Auth/auth_rule_add',array('id'=>$m['id'],'is_add'=>1,parent_id=>$m['parent_id']))}','编辑菜单','bianjicaidan')" class="btn btn-success btn-sm">编辑</a>
                &nbsp;
                <a href="javascript:;" onclick="delete_ok({$m['id']})" class="btn btn-danger  btn-sm">删除</a>

            </td>
        </tr>
    </volist>
        <else/>
        <tr>
            <td colspan="7" align="center">暂无数据!</td>
        </tr>
    </notempty>

    </tbody>
</table>
<table style="width: 100%;">
    <tr>
        <td style="text-align: right;"> <div class="page_list_ops dataTables_paginate paging_bootstrap pagination" >{$treeList['page_html']}</div></td>
    </tr>
</table>

<script type="text/javascript">
    $(function(){
        $("#tbmain tr").hover(function(){
            $(this).css({"background-color":"rgba(243, 236, 236, 0.72)"});
        },function(){
            $(this).css({"background-color":"#fff"});
        });
    });
</script>